﻿using EasyI18n.Api.Infrastructure.DataPersistence.MongoDb.Entities.Bases;
using EasyI18n.Api.Infrastructure.MongoDb;
using MongoDB.Driver;

namespace EasyI18n.Api.Infrastructure.DataPersistence.MongoDb;

public class DocumentAccessor<T>(MongoDbContext mongoDbContext) : IDocumentAccessor<T> where T : IMongoDbEntity
{
    public IMongoCollection<T> Collection => mongoDbContext.Database.GetCollection<T>(typeof(T).Name);
}